// 导入自己封装的axios实例对象
import request from '@/utils/request'

// 获取文章的评论 或者 评论的回复
export const getCommentList = params=>{
  return request({
    url:'/v1_0/comments',
    params
  })
}

// 评论或回复添加点赞
export const addCommentZan = data=>{
  return request({
    url:'/v1_0/comment/likings',
    method:'post',
    data
  })
}

// 评论或回复取消点赞
export const deleteCommentZan = target=>{
  return request({
    url:'/v1_0/comment/likings/'+target,
    method:'delete',
  })
}

// 添加评论或评论回复
export const addComment = data=>{
  return request({
    url:'/v1_0/comments',
    method:'POST',
    data
  })
}